package com.fxu.framework.core.exception;

import com.fxu.framework.core.base.ResultCode;

/**
 * 消息异常
 * @author fangxu
 * @version 1.0.0
 */
public class MsgException extends RuntimeException {

	private static final long serialVersionUID = 8623281894642117252L;
	
	private ResultCode restStatus;

	public ResultCode getRestStatus() {
		return restStatus;
	}

	public void setRestStatus(ResultCode restStatus) {
		this.restStatus = restStatus;
	}

	public MsgException(ResultCode restStatus) {
        super(restStatus.desc());
        this.restStatus = restStatus;
    }

	public MsgException(String message) {
        super(message);
    }

	public MsgException(String format, Object ...args) {
		super(String.format(format, args));
	}

    public MsgException(String message, Throwable cause) {
        super(message, cause);
    }

}